<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width"
	/>
	<meta content="yes" name="apple-mobile-web-app-capable">
	<meta content="black" name="apple-mobile-web-app-status-bar-style">
	<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
	<meta http-equiv="Pragma" content="no-cache">
	<meta http-equiv="Expires" content="0">
	<meta name="format-detection" content="telephone=no">
	<title>Happy 2017</title>
</head>
<body style="height:100%;">
<video id="video" autoplay="autoplay" style='width:100%;height:100%;'></video>
<img src="./2017.PNG" style="width:100%;">
<script type="text/javascript">
	var video = document.getElementById("video");
//	var context = canvas.getContext("2d");
	var errocb = function (code) {
		console.log(code);
	};
	if (navigator.getUserMedia) { // 标准的API
		navigator.getUserMedia({ "video": true }, function (stream) {
			video.src = stream;
			video.play();
		}, errocb);
	} else if (navigator.webkitGetUserMedia) { // WebKit 核心的API

		console.log(navigator.webkitGetUserMedia);
		navigator.webkitGetUserMedia({ "video": true }, function (stream) {

			video.src = window.webkitURL.createObjectURL(stream);
			video.play();
		}, errocb);

	}
	//    将拍好的照片显示在画布上
//	document.getElementById("picture").addEventListener("click", function () {
//		context.drawImage(video, 0, 0, 640, 480);
//	});
</script>
</body>
</html>